// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 

package com.nnee.p_pr.p_activity;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.widget.AutoCompleteTextView;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.ProgressBar;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.nnee.p_fk.cls_ActivityEx;
import com.nnee.p_fk.cls_k;
import com.nnee.p_img.cls_c;
import com.nnee.p_pr.p_activity.p_a.cls_ad;
import com.nnee.p_pr.p_activity.p_a.cls_al;
import com.nnee.p_pr.p_atom.cls_g;
import com.nnee.p_pr.p_atom.cls_u;
import com.nnee.p_pr.cls_b;
import com.nnee.p_pr.p_prot.cls_d;
import com.nnee.p_pr.cls_v;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.Stack;

// Referenced classes of package com.nnee.p_pr.p_activity:
//            cg, ch, ci, cf, 
//            ce

public class cls_MallListActivity extends cls_ActivityEx
{

    public cls_MallListActivity()
    {
        h = false;
        i = 0;
        k = 0;
        l = 0;
        m = 0;
        n = "server";
        o = null;
        p = null;
        q = null;
        r = null;
        d = null;
        w = null;
        x = null;
        H = new cls_cg(this);
        e = new cls_ch(this);
        I = new cls_ci(this);
        f = new cls_cf(this);
        g = new cls_ce(this);
    }

    private int a(int i1, Object obj, String s1, String s2)
    {
        switch(i1)
        {
        case 2:
        	i = com.nnee.p_pr.cls_v.a().f();
        break;
        case 302:
        	i = com.nnee.p_pr.cls_v.a().a((cls_u)obj);
            break;
        case 303:
        	i = com.nnee.p_pr.cls_v.a().b((cls_u)obj);
            break;
        case 304:
        	 i = com.nnee.p_pr.cls_v.a().a(s1);
            break;
        default:
        	i = 0;
            break;
        }
        
        return i;
      
    }

    static int a(cls_MallListActivity malllistactivity, int i1)
    {
    	malllistactivity.l = i1;
        return i1;
    }

    static int a(cls_MallListActivity malllistactivity, int i1, Object obj, String s1, String s2)
    {
        return malllistactivity.a(i1, obj, s1, s2);
    }

    static ImageView a(cls_MallListActivity malllistactivity)
    {
        return malllistactivity.G;
    }

    static String a(cls_MallListActivity malllistactivity, String s1)
    {
    	malllistactivity.o = s1;
        return s1;
    }

    private void a(int i1, cls_d d1)
    {
        switch(l){
        case 1:
        	 if(s.containsKey(new Integer(i1)))
             {
                 x.a((new StringBuilder()).append("title").append(i1).toString(), 0);
                 android.widget.ListAdapter listadapter = x.a((new StringBuilder()).append("data").append(i1).toString(), 0);
                 if(listadapter != null && (listadapter instanceof cls_ad))
                     ((cls_ad)listadapter).b(d1.h);
                 s.remove(new Integer(i1));
                 if(s.size() == 0)
                     e();
             }
        	break;
        case 2:
        	if(!s.containsKey(new Integer(i1)))
                break; /* Loop/switch isn't completed */
            s.remove(new Integer(i1));
            b(d1);
            e();
            if(1 == k)
            {
                y.a(d1.h);
                k = 0;
                b(false);
            } else
            {
                x.a();
                x.a("", y);
                x.a("", 0);
                y.c();
                y.a();
                y.b(d1.h);
                w.setSelection(m);
                w.addFooterView(z);
                w.setAdapter(y);
                w.removeFooterView(z);
            }
            a(d1);
            h = false;
        	break;
        default:
        	break;
        }
        
    }

    public static void a(Context context)
    {
        context.startActivity(new Intent(context, com.nnee.p_pr.p_activity.cls_MallListActivity.class));
    }

    static void a(cls_MallListActivity malllistactivity, int i1, cls_d d1)
    {
    	malllistactivity.a(i1, d1);
    }

    static void a(cls_MallListActivity malllistactivity, cls_d d1)
    {
    	malllistactivity.c(d1);
    }

    private void a(cls_d d1)
    {
        String s1;
        s1 = p;
        p = null;
        if(d1.g != null) {
        	String s2 = d1.g.b(cls_g.iEPageNext);
            if(!TextUtils.isEmpty(s2))
                if(s2.equals(s1))
                    p = null;
                else
                    p = s2;
        }
    }

    static boolean a(cls_MallListActivity malllistactivity, boolean flag)
    {
    	malllistactivity.h = flag;
        return flag;
    }

    static int b(cls_MallListActivity malllistactivity, int i1)
    {
    	malllistactivity.m = i1;
        return i1;
    }

    static AutoCompleteTextView b(cls_MallListActivity malllistactivity)
    {
        return malllistactivity.E;
    }

    static String b(cls_MallListActivity malllistactivity, String s1)
    {
    	malllistactivity.p = s1;
        return s1;
    }

    private void b(cls_d d1)
    {
        String s1 = d1.g.b(cls_g.aESearch);
        q = s1;
        if(TextUtils.isEmpty(s1))
            D.setVisibility(8);
        else
            D.setVisibility(0);
    }

    private void b(boolean flag)
    {
        if(flag)
        {
            A.setVisibility(0);
            B.setVisibility(0);
            C.setText(0x7f0a009d);
        } else
        {
            A.setVisibility(8);
        }
    }

    static InputMethodManager c(cls_MallListActivity malllistactivity)
    {
        return malllistactivity.t;
    }

    private void c(cls_d d1)
    {
        LinkedList linkedlist;
        x.a();
        w.addFooterView(z);
        w.setAdapter(x);
        w.removeFooterView(z);
        b(d1);
        linkedlist = d1.h;
        if(linkedlist == null || linkedlist.isEmpty())
            return;
        c();
        boolean flag;
        do
        {
            cls_u u1 = (cls_u)linkedlist.removeFirst();
            String s1 = u1.b(cls_g.bEAlernate);
            String s2 = u1.aR();
            if(s1 != null && s1.length() > 0)
            {
                int i1 = a(304, null, s1, null);
                Integer integer = new Integer(i1);
                s.put(integer, s2);
                View view = getLayoutInflater().inflate(0x7f030005, null, false);
                ((TextView)view.findViewById(0x7f0d0016)).setText(s2);
                String as[] = new String[7];
                as[0] = "icon";
                as[1] = "mark";
                as[2] = "title";
                as[3] = "content";
                as[4] = "ratingbar";
                as[5] = "button";
                as[6] = "subs";
                int ai[] = new int[7];
                ai[0] = 0x7f0d0024;
                ai[1] = 0x7f0d007a;
                ai[2] = 0x7f0d0018;
                ai[3] = 0x7f0d007d;
                ai[4] = 0x7f0d0097;
                ai[5] = 0x7f0d007e;
                ai[6] = 0x7f0d0099;
                cls_ad ad1 = new cls_ad(this, 2, 0x7f03002f, as, ai);
                x.a((new StringBuilder()).append("title").append(i1).toString(), view);
                x.a((new StringBuilder()).append("data").append(i1).toString(), ad1);
            }
            flag = linkedlist.isEmpty();
        } while(!flag);
 
    }

    static String d(cls_MallListActivity malllistactivity)
    {
        return malllistactivity.q;
    }

    static cls_al e(cls_MallListActivity malllistactivity)
    {
        return malllistactivity.x;
    }

    static HashMap f(cls_MallListActivity malllistactivity)
    {
        return malllistactivity.s;
    }

    private void f()
    {
        v = (ProgressBar)findViewById(0x7f0d000c);
        u = (TextView)findViewById(0x7f0d0009);
        w = (ListView)findViewById(0x7f0d0096);
        w.setDivider(null);
        w.setDividerHeight(0);
        z = LayoutInflater.from(this).inflate(0x7f030008, null);
        w.addFooterView(z);
        A = (LinearLayout)z.findViewById(0x7f0d001a);
        B = (ProgressBar)z.findViewById(0x7f0d001b);
        C = (TextView)z.findViewById(0x7f0d001c);
        D = (RelativeLayout)findViewById(0x7f0d006b);
        E = (AutoCompleteTextView)findViewById(0x7f0d0072);
        F = (ImageView)findViewById(0x7f0d0073);
        G = (ImageView)findViewById(0x7f0d0074);
    }

    private void g()
    {
        if(u != null)
            u.setOnClickListener(e);
        if(y != null)
            y.a(e);
        if(w != null)
        {
            w.setOnItemClickListener(I);
            w.setOnScrollListener(f);
        }
        E.addTextChangedListener(H);
        E.setHint(0x7f0a0079);
        F.setOnClickListener(e);
        G.setOnClickListener(e);
        G.setClickable(false);
        G.setEnabled(false);
//_L1:
//        return;
//        NullPointerException nullpointerexception;
//        nullpointerexception;
//        nullpointerexception.printStackTrace();
//          goto _L1
//        Exception exception;
//        exception;
//        throw exception;
    }

    static boolean g(cls_MallListActivity malllistactivity)
    {
        return malllistactivity.h;
    }

    static String h(cls_MallListActivity malllistactivity)
    {
        return malllistactivity.o;
    }

    private void h()
    {
        x = new cls_al();
        String as[] = new String[7];
        as[0] = "icon";
        as[1] = "mark";
        as[2] = "title";
        as[3] = "content";
        as[4] = "ratingbar";
        as[5] = "button";
        as[6] = "subs";
        int ai[] = new int[7];
        ai[0] = 0x7f0d0024;
        ai[1] = 0x7f0d007a;
        ai[2] = 0x7f0d0018;
        ai[3] = 0x7f0d007d;
        ai[4] = 0x7f0d0097;
        ai[5] = 0x7f0d007e;
        ai[6] = 0x7f0d0099;
        y = new cls_ad(this, 2, 0x7f03002f, as, ai);
        y.e(j);
        w.setAdapter(x);
        w.removeFooterView(z);
    }

    static Stack i(cls_MallListActivity malllistactivity)
    {
        return malllistactivity.r;
    }

    static int j(cls_MallListActivity malllistactivity)
    {
        return malllistactivity.k;
    }

    static void k(cls_MallListActivity malllistactivity)
    {
    	malllistactivity.r();
    }

    static ListView l(cls_MallListActivity malllistactivity)
    {
        return malllistactivity.w;
    }

    static View m(cls_MallListActivity malllistactivity)
    {
        return malllistactivity.z;
    }

    static com.nnee.p_pr.p_activity.p_a.cls_ad n(cls_MallListActivity malllistactivity)
    {
        return malllistactivity.y;
    }

    private void r()
    {
        if(p != null)
        {
            k = 1;
            int i1 = a(304, null, p, null);
            s.put(new Integer(i1), p);
            w.addFooterView(z);
            c();
            b(true);
        }
    }

    public void b()
    {
        setTitle(0x7f0a004e);
        u.setBackgroundDrawable(com.nnee.p_fk.cls_k.a(this).b(0x7f020134));
        u.setText(getString(0x7f0a00bc));
        int i1 = com.nnee.p_img.cls_c.a(d, 8F);
        ((LinearLayout)findViewById(0x7f0d0005)).setPadding(0, 0, i1, 0);
    }

    public void c()
    {
        u.setVisibility(8);
        v.setVisibility(0);
    }

    public void e()
    {
        u.setVisibility(0);
        v.setVisibility(8);
    }

    public void f_()
    {
        if(u != null)
            u.setBackgroundDrawable(com.nnee.p_fk.cls_k.a(this).b(0x7f020134));
    }

    protected void onActivityResult(int i1, int j1, Intent intent)
    {
        switch(i1){
        case 4097:
        	if(j1 == -1 && intent != null)
            {
                Bundle bundle = intent.getExtras();
                if(bundle != null)
                {
                    String s1 = bundle.getString("extra_query");
                    E.setText(s1);
                    AutoCompleteTextView autocompletetextview = E;
                    int k1;
                    if(s1 == null)
                        k1 = 0;
                    else
                        k1 = s1.length();
                    autocompletetextview.setSelection(k1);
                }
            }
        	break;
        	default:
        		break;
        }
      
    }

    public void onCreate(Bundle bundle)
    {
        super.onCreate(bundle);
        setContentView(0x7f030031);
        d = this;
        s = new HashMap();
        r = new Stack();
        l = 1;
        k = 0;
        j = com.nnee.p_b.p_a.cls_d.f();
        t = (InputMethodManager)getSystemService("input_method");
        com.nnee.p_pr.cls_v.a().a(g);
        f();
        h();
        g();
        b();
        o = n;
        int i1 = a(2, null, null, null);
        s.put(new Integer(i1), n);
        c();
    }

    public void onDestroy()
    {
        super.onDestroy();
        com.nnee.p_pr.cls_v.a().b(g);
        com.nnee.p_img.cls_d.a().a(j);
        if(v != null)
            v.setVisibility(8);
        if(B != null)
            B.setVisibility(8);
        if(r != null)
            r.clear();
        if(s != null)
            s.clear();
        if(y != null)
            y.b();
        if(x != null)
            x.a();
        if(e != null)
            e = null;
        if(f != null)
            f = null;
        if(I != null)
            I = null;
        if(w != null)
            w = null;
        p = null;
        o = null;
        z = null;
        A = null;
        B = null;
        C = null;
        d = null;
    }

    public boolean onKeyDown(int i1, KeyEvent keyevent)
    {
    	boolean flag =false;
    	if(4 != i1 || r.empty()) {
    		flag = super.onKeyDown(i1, keyevent);
    	} else {
    		com.nnee.p_pr.p_activity.p_view.cls_al al1;
            String s1;
            al1 = (com.nnee.p_pr.p_activity.p_view.cls_al)r.pop();
            s1 = al1.a;
            m = al1.b;
            if(s1 == null){} else {
            	 s.clear();
                 p = null;
                 int k1;
                 if(s1.equals(n))
                 {
                     l = 1;
                     k1 = a(2, null, null, null);
                 } else
                 {
                     l = 2;
                     int j1 = a(304, null, s1, null);
                     com.nnee.p_pr.p_d.cls_c.a(p(), 1699, al1.c);
                     k1 = j1;
                 }
                 s.put(new Integer(k1), s1);
                 c();
                 b(false);
                 k = 0;
                 o = s1;
                 flag = true;
            }
    	}
        return flag;
        
 
    }

    public static final int a = 0;
    public static final int b = 1;
    public static final int c = 4097;
    private LinearLayout A;
    private ProgressBar B;
    private TextView C;
    private RelativeLayout D;
    private AutoCompleteTextView E;
    private ImageView F;
    private ImageView G;
    private TextWatcher H;
    private android.widget.AdapterView.OnItemClickListener I;
    public Context d;
    android.view.View.OnClickListener e;
    android.widget.AbsListView.OnScrollListener f;
    cls_b g;
    private boolean h;
    private int i;
    private int j;
    private int k;
    private int l;
    private int m;
    private String n;
    private String o;
    private String p;
    private String q;
    private Stack r;
    private HashMap s;
    private InputMethodManager t;
    private TextView u;
    private ProgressBar v;
    private ListView w;
    private cls_al x;
    private cls_ad y;
    private View z;
}
